<?php
header("charset=UTF-8");

$prodType = $_POST['prodType'];
$prodName = $_POST['prodName'];
$member = $_POST['member'];
$teacher = $_POST['teacher'];
$telephone = $_POST['telephone'];
$school = $_POST['school'];


$servername = "localhost";
$username = "root";
$password = "root";
$db = "league";

// 创建连接
try {
    $conn = new mysqli($servername, $username, $password, $db);
    $insert = $conn->prepare("INSERT INTO league VALUES (?, ?, ?, ?,?,?)");
    $insert->bind_param('ssssss', $prodType, $prodName, $member, $teacher, $telephone, $school);
    $insert->execute();
    echo 1;

} catch (Exception $e) {
    echo 0;
}
